---
description: "Reference for Nitric's v0 JVM library - Create a reference to a file within a bucket."
---

# JVM - bucket.file()

Create a reference to a file within a bucket.

<Tabs syncKey="jvm-lang">

<TabItem label="Java">

```java
import io.nitric.Nitric;

public class Application {
  public static void main(String[] args) {
    var bucket = Nitric.INSTANCE.bucket("images").with();

    var file = bucket.file("cat.png");

    Nitric.INSTANCE.run();
  }
}
```

</TabItem>

<TabItem label="Kotlin">

```kotlin
import io.nitric.Nitric

fun main() {
  val bucket = Nitric.bucket("images").with()

  var file = bucket.file("cat.png")

  Nitric.run()
}
```

</TabItem>

</Tabs>

## Parameters

<Properties>
  <Property name="name" required type="string">
    The unique name/reference to the file.
  </Property>
</Properties>

## Notes

The file does not need to exist, only a reference to that file is being created.

## Available Operations

- [file.get()](./bucket-file-read)
- [file.write()](./bucket-file-write)
- [file.delete()](./bucket-file-delete)
- [file.getDownloadUrl()](./bucket-file-uploadurl)
- [file.getUploadUrl()](./bucket-file-downloadurl)
